import VueRouter from 'vue-router';
//导入tarbar相关路由
import HomeContainer from './components/tarbar/HomeContainer.vue';
import MemberContainer from './components/tarbar/MemberContainer.vue';
import ShopCarContainer from './components/tarbar/ShopCarContainer.vue';
import SearchContainer from './components/tarbar/SearchContainer.vue';
//导入新闻LISt路由
import NewsList from './components/NewsList/NewsList.vue';
import NewsInfo from './components/NewsList/NewsInfo.vue';

//导入图片路由
import Pictures from './components/Pictures/Pictures.vue'

// 导入评论子组件
// import Commit from './components/Commit/Commit.vue';
var router = new VueRouter({
  routes: [
    {
      path: '/',
      redirect: '/home'
    },
    {
      path: '/home',
      component: HomeContainer
    },
    {
      path: '/member',
      component: MemberContainer
    },
    {
      path: '/shopcar',
      component: ShopCarContainer
    },
    {
      path: '/search',
      component: SearchContainer
    },
    {
      path: '/home/newslist',
      component: NewsList
    },
    {
      path: '/home/newsinfo/:id',
      component: NewsInfo
    },
    {
      path: '/home/pictures',
      component: Pictures
    }
  ],
  linkActiveClass: 'mui-active' //覆盖默认路由高亮类
});

export default router;
